﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StyleMVVM.DependencyInjection.Impl;

namespace StyleMVVM.DependencyInjection.Conditions
{
	public class ExportWhenConfigValueNotAttribute : Attribute, IExportConditionAttribute
	{
		private string configName;
		private object configValue;
		private bool cache;

		public ExportWhenConfigValueNotAttribute(string configName, object configValue)
		{
			this.configName = configName;
			this.configValue = configValue;
			this.cache = true;
		}

		public ExportWhenConfigValueNotAttribute(string configName, object configValue, bool cache)
		{
			this.configName = configName;
			this.configValue = configValue;
			this.cache = cache;
		}

		public IExportCondition ProvideCondition(Type exportType)
		{
			return new WhenConfigValueNot(configName, configValue, cache);
		}
	}
}
